//组合类的初始化
#include <iostream>
using namespace std;

//point类
class Point //点类，用两个坐标描述
{
private:
  int x, y;

public:
  Point(int a, int b) //构造函数，带两个整型参数
  {
    x = a;
    y = b;
    cout << "Point 构造函数 1(" << x << "," << y << ")" << endl;
  };
  Point(Point &A){
    x = A.x;
    y = A.y;
    cout<< "Point 构造函数 2(" << x << "," << y << ")" << endl;
  }
  void show(){
    cout<< "Point (" << x << "," << y << ")" << endl;
  }
};

//Rectangle类
class Rectangle
{
  private:
    Point lefttop;
    Point rightbottom;
    public:
    //构造函数，使用四个整数初始化
    Rectangle(int x1,int y1, int x2, int y2):rightbottom(x2,y2), lefttop(x1,y1)
    {
      cout << "Rectangle构造函数1" << endl;
    }:
    //构造函数，使用Point对象初始化
    Rectangle(Point A, Point B):rightbottom(B), lefttop(A)
    {
      
    }
}
